package com.cn.jsdr.controller;

import com.cn.jsdr.service.AddService;
import com.cn.jsdr.service.UpdateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("update")
public class UpdateController {
    @Autowired
    private UpdateService updateService;
    @RequestMapping("test")
    public Map insertTest(int id){
        Map m= new HashMap();
        m.put("phone","18236955931");
        m.put("usname","老王");
        m.put("state",2);
        m.put("id",id);
        updateService.update("4",m);
        return m;
    }
}
